﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using InteControlSys.VehicleControlService;
using System.ComponentModel;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
using System.Windows.Input;
using Microsoft.Expression.Interactivity.Core;
using System.Windows;


namespace InteControlSys.ViewModel
{
    public class UnnknownNodeViewModel : NodeViewModel
    {
        #region propertities

        private string license;
        [Category("基本")]
        [DisplayName("车牌")]
        [PropertyOrder(1)]
        public string License
        {
            get { return license; }
            set
            {
                license = value;
                this.NotifyChanged("License");
            }
        }

        private string cameraName;
        [Category("基本")]
        [DisplayName("拍照地点")]
        [PropertyOrder(2)]
        public string CameraName
        {
            get { return cameraName; }
            set
            {
                cameraName = value;
                this.NotifyChanged("CameraName");
            }
        }

        private DateTime enterTime;
        [Category("基本")]
        [DisplayName("入场时间")]
        [PropertyOrder(3)]
        public DateTime EnterTime
        {
            get { return enterTime; }
            set
            {
                enterTime = value;
                this.NotifyChanged("EnterTime");
            }
        }

        private Guid id;
        public Guid ID
        {
            get { return id; }
            set
            {
                id = value;
                this.NotifyChanged("ID");
            }
        }

        private Guid cameraID;
        public Guid CameraID
        {
            get { return cameraID; }
            set
            {
                cameraID = value;
                this.NotifyChanged("CameraID");
            }
        }

        private string imageUrl1;
        public string ImageUrl1
        {
            get { return imageUrl1; }
            set
            {
                imageUrl1 = value;
                this.NotifyChanged("ImageUrl1");
            }
        }

        private string imageUrl2;
        public string ImageUrl2
        {
            get { return imageUrl2; }
            set
            {
                imageUrl2 = value;
                this.NotifyChanged("ImageUrl2");
            }
        }

        private string imageUrl3;
        public string ImageUrl3
        {
            get { return imageUrl3; }
            set
            {
                imageUrl3 = value;
                this.NotifyChanged("ImageUrl3");
            }
        }
        #endregion

        public UnnknownNodeViewModel(string name)
        {
            this.Name = name;
            this.Parent = null;
            this.IsExpanded = true;
            this.NodeType = "UnnknownNodeViewModel";
        }

        public UnnknownNodeViewModel(UnknownVehicleInfo info)
        {
            this.Name = info.License;
            this.Parent = null;
            this.IsExpanded = true;
            this.NodeType = "UnnknownNodeViewModel";
            this.CameraID = info.CameraID;
            this.CameraName = info.CameraName;
            this.EnterTime = info.EnterTime;
            this.ID = info.ID;
            this.License = info.License;
            this.ImageUrl1 = info.ImageUrl1;
            this.ImageUrl2 = info.ImageUrl2;
            this.ImageUrl3 = info.ImageUrl3;

        }
        public override Uri GetMyIcon()
        {
            return new Uri("../Resources/Images/norecord.png", UriKind.RelativeOrAbsolute);
        }



    }
}
